set mem 550m
set matsize 5000
log using "G:\whalley\projects\college_spending\programs\analysis\RESTAT_final\table3.log", replace
#delimit ;
set more 1;
*
* TABLE3.DO
* BY Alex Whalley
* VERSION OF 07/10/09
*;
use "G:\whalley\projects\college_spending\programs\analysis\RESTAT_final\main_data.dta", replace;
*
* DROP SMALL COUNTIES
*;
drop if totpop < 250000;
*
* REORMALIZE TOTAL EXPENDITURE TO BE $100k PER PERSON 
*;
gen ECFET3d1p = ECFET3d1 / 1000; 
drop ECFET3d1;
rename ECFET3d1p ECFET3d1;
gen ECFET5d1p = ECFET5d1 / 1000; 
drop ECFET5d1;
rename ECFET5d1p ECFET5d1;
gen endowl4_spindexd3d1_1 = endowl4_spindexd3d1 / 1000;
drop endowl4_spindexd3d1;
rename endowl4_spindexd3d1_1 endowl4_spindexd3d1;
gen endowl6_spindexd5d1_1 = endowl6_spindexd5d1 / 1000;
drop endowl6_spindexd5d1;
rename endowl6_spindexd5d1_1 endowl6_spindexd5d1;
*
* PART (A): LOOK AT IV FIRST STAGE AND OTHER UNIV OUTCOMES: 3 YEAR
*;
xi: reg ECFET3d1 endowl4_spindexd3d1 i.year [fw=semp81], cluster(FIPSCOUNTY);
test endowl4_spindexd3d1;
sum ECFET3d1 if endowl4_spindexd3d1 !=.;
*
* PART (B): LOOK AT IV FIRST STAGE AND OTHER UNIV OUTCOMES: 5 YEAR
*;
xi: reg ECFET5d1 endowl6_spindexd5d1 i.year [fw=semp81], cluster(FIPSCOUNTY);
test endowl6_spindexd5d1;
sum ECFET5d1 if endowl6_spindexd5d1 !=.;
*
* CLOSE LOG, CLEAR AND END
*;
log close;
*clear;